# testrssblogservice.py
# Original Author: Amar Zumkhawala (amarzumkhawala@gmail.com)
# Project URL - http://code.google.com/p/feedflare-categories
# Distributed under Apache License 2.0
#
# $Revision: 7 $, $Date: 2008-12-28 01:00:43 -0500 (Sun, 28 Dec 2008) $
# $Author: amarzumkhawala $

from blogservice import AbstractBlogService, BlogEntry


#######
#
# Test implementation.
#
#######
class TestRssBlogService(AbstractBlogService):
  def __init__(self):
    self._blogEntry = BlogEntry()
    self._blogEntry.setAtomId("http://www.test.com/some/post.html")
    self._blogxml = "<?xml version=\"1.0\"?><rss version=\"2.0\"><item><category><![CDATA[t1]]></category><category>t2</category><link rel=\"alternate\" href=\"http://www.test.com/some/post.html\"/><guid>    http://www.test.com/some/post.html     </guid></item></rss>"
    self._blogSearchByCategoryUrl = "http://www.test.com/search/t1rss"
  def fetchBlogXml(self,blogEntry):
    return self._blogxml
  def getBlogSearchByCategoryUrl(self,atomEntryParser):
    return self._blogSearchByCategoryUrl
  def blogEntry(self):
    return self._blogEntry
